<?
require_once 'base.php';

class Controlador extends Base {
	
	public function __construct() {
		parent::__construct('controlador');
	}


    /**
     * @param array $perfil
     */
    public function recuperarControladorPorPerfil($perfil) {
        //select * from controlador left join permissao on permissao.pr_id = controlador.pr_id left join perfil_permissao on perfil_permissao.pr_id = permissao.pr_id where pe_id in (1)
        $this->join('permissao', 'pr_id');
        $this->join('perfil_permissao', 'pr_id');
        $this->db->where_in('pe_id', $perfil);

        return $this->recuperar();
    }
}
